2020-2021 Sunseeker Telemetry and Lighting System
adc12_a_ex8_tempSensor.c File Reference
#include "driverlib.h"

Go to the source code of this file.

Functions

void main (void)
 
void ADC12ISR (void)
 

Variables

long temp
 
volatile long IntDegF
 
volatile long IntDegC
 

Function Documentation

◆ ADC12ISR()

void ADC12ISR ( void  )

Definition at line 183 of file adc12_a_ex8_tempSensor.c.

References __bic_SR_register_on_exit(), and temp.

◆ main()

void main ( void  )

Definition at line 74 of file adc12_a_ex8_tempSensor.c.

References __delay_cycles(), __no_operation(), IntDegC, IntDegF, param, and temp.

Variable Documentation

◆ IntDegC

volatile long IntDegC

Definition at line 72 of file adc12_a_ex8_tempSensor.c.

Referenced by main().

◆ IntDegF

volatile long IntDegF

Definition at line 71 of file adc12_a_ex8_tempSensor.c.

Referenced by main().

◆ temp

long temp

ADC12_A - Sample A10 Internal Temp Sensor as Input, AVcc Ref

A single sample is made on A10 with reference to internal 1.5V Vref. Software sets ADC12SC to start sample and conversion - ADC12SC automatically cleared at EOC. ADC12_A internal oscillator times sample and conversion. In Mainloop MSP430 waits in LPM4 to save power until ADC10_A conversion complete, ADC12_A_ISR will force exit from any LPMx in Mainloop on reti. ACLK = n/a, MCLK = SMCLK = default DCO ~ 1.045MHz, ADC12CLK = ADC12OSC

Uncalibrated temperature measured from device to device will vary do to slope and offset variance from device to device - please see datasheet.

          MSP430F5529
       -----------------
   /|\|                 |
    | |                 |
    --|RST              |
      |Temp Sensor-->A10|
      |                 |

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

  • ADC12_A peripheral
  • A10

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

  • ADC12_A_VECTOR

Definition at line 70 of file adc12_a_ex8_tempSensor.c.

Referenced by ADC12ISR(), main(), and TIMER_A().